
[#escape x as (x)!?html]
<div class="container">
    <div class="login">
        <div class="login-info">
            <span>欢迎来到山东房协网!</span>
            <a class="login-btn" href="/cmscp/index.do">后台登录</a>
        </div>
        <form action="${ctx}/search.jspx" class="clearfix" method="get">
            <div class="search">
                <input type="text" name="title" value="${Param.title}" placeholder="输入关键字搜索"/>
                <button type="submit"><img src="_files/img/search.png" alt=""></button>
            </div>
        </form>
    </div>
    <div class="logo clearfix">
        <a href="/"><img src="_files/img/logo.png" /></a>
    </div>
</div>
<div class="nav">
    <ul class="clearfix index-nav" id="jMenu">

        [@NodeList  limit=7;list]
        [#list list as index]
        [#if index.id==99]
        <li class="nav-item">
            <a class="fNiv" href="${ctx}/" >${index.name}</a>
        </li>
       [#else]
        <li class="nav-item">
            <a class="fNiv" href="${index.url}">${index.name}</a>
            <ul class="navlist" style="display: none">
                [@NodeList parentId=index.id;list]
                [#list list as index1]
                <li class="list-children"><a href="${index1.url}">${index1.name}</a></li>
                [/#list]
                [/@NodeList]
            </ul>
        </li>
        [/#if]
        [/#list]
        [/@NodeList]
    </ul>
    <div class="nav-listbg" style="display: none"></div>
</div>

<script type="text/javascript">
    $(document).ready(function(){
        //同步宽度对齐
        $(".list-children").map(function(){
            $(this).css('width',$(this).parent().width());
        });

        $('.nav-listbg').css('width',$('.nav-listbg').parent().width());

        //hover 事件绑定
        $('.nav-item,.nav-listbg').hover(function(){
            $('.navlist,.nav-listbg').show();
        },function(){
            $('.navlist,.nav-listbg').hide();
        })


    })
</script>
[/#escape]
